class Solution(object):
    def containsDuplicate(self, nums):
        """
        :type nums: List[int]
        :rtype: bool
        """
        already_set = set()
        for item in nums:
            if item not in already_set:
                already_set.add(item)
            else:
                return True
        return False


data = Solution()
nums = [1,1,1,3,3,4,3,2,4,2]
print(data.containsDuplicate(nums))
